package com.kitty.game.utils;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.ServerService;
import com.kitty.game.child.model.ChildInfo;
import com.kitty.game.config.GuardSet;
import com.kitty.game.enter.FiedValue;
import com.kitty.game.enter.RespUpdate;
import com.kitty.game.fight.bean.FightObject;
import com.kitty.game.fight.service.CountService;
import com.kitty.game.fuling.model.Fuling;
import com.kitty.game.guard.model.Guard;
import com.kitty.game.hunpo.service.HunPoService;
import com.kitty.game.mirror.model.RoleMirror;
import com.kitty.game.neidan.model.NeidanProp;
import com.kitty.game.pet.model.Pet;
import com.kitty.game.pet.service.PetService;
import com.kitty.game.player.model.HunPoProp;
import com.kitty.game.player.model.PlayerProfile;
import com.kitty.game.role.model.Role;
import com.kitty.game.role.service.RoleService;
import com.kitty.game.wuhun.WuHunPoProp;
import com.kitty.game.wuhun.WuHunService_;
import com.kitty.mina.message.MessagePusher;
import org.nutz.lang.util.NutMap;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;

public class FieldUtils {

    /**
     * 返回掌门信息
     */
    public static List<FiedValue> getMasterInfo(RoleMirror roleMirror) {
        List<FiedValue> list = new ArrayList<>();
        list.add(new FiedValue(40, roleMirror.getIcon()));
        list.add(new FiedValue(36, roleMirror.getTitle()));//TODO 也有可能是那个角色当前的称号
        list.add(new FiedValue(31, roleMirror.getLevel()));
        list.add(new FiedValue(90, roleMirror.getMessage()));
        list.add(new FiedValue(880, 0));//Todo 会员等级
        list.add(new FiedValue(196, roleMirror.getPartyName() != null ? roleMirror.getPartyName() : "无"));
        list.add(new FiedValue(29, 0));
        list.add(new FiedValue(341, 4));//Todo 飞升状态
        list.add(new FiedValue(1, roleMirror.getName()));
        list.add(new FiedValue(295, roleMirror.getSuitLightEffect()));//Todo 套装光效 7001-7005
        list.add(new FiedValue(290, roleMirror.getWeaponIcon()));//todo 武器的Icon
        list.add(new FiedValue(291, roleMirror.getSuitIcon()));//Todo 套装的ID
        return list;
    }

    /**
     * 好友私聊
     *
     * @return
     */
    public static List<FiedValue> getFriendChatList(Role role) {
        return getFriendChatList(role.getGid(), role.getLevel(), role.getRoleIcon());
    }

    /**
     * 好友私聊
     *
     * @return
     */
    public static List<FiedValue> getFriendChatList(String gid, short level, short roleIcon) {
        List<FiedValue> list = new ArrayList<>();
        list.add(new FiedValue(305, gid));
        list.add(new FiedValue(3024, ""));
        list.add(new FiedValue(445, 0));
        list.add(new FiedValue(31, level));
        list.add(new FiedValue(40, roleIcon));
        list.add(new FiedValue(3023, ""));
        return list;
    }

    /**
     * 搜索好友
     */
    public static List<FiedValue> searchFriend(Role role) {
        List<FiedValue> list = new ArrayList<>();
        list.add(new FiedValue(305, role.getGid()));
        list.add(new FiedValue(1, role.getName()));
        list.add(new FiedValue(31, role.getLevel()));
        list.add(new FiedValue(33, role.getPartyName()));
        list.add(new FiedValue(880, role.getVipType()));//会员等级
        list.add(new FiedValue(40, role.getRoleIcon()));
        list.add(new FiedValue(334, 0));
        list.add(new FiedValue(3012, SpringUtils.getBean(ServerService.class).getServer().getSonName()));
        return list;
    }

    /**
     * 世界消息
     *
     * @param role
     * @return
     */
    public static ArrayList<FiedValue> getChatList(Role role) {
        ArrayList<FiedValue> list = new ArrayList<>();
        NutMap propsStatus = role.getPropsStatus();
        list.add(new FiedValue(3024, propsStatus == null?"":propsStatus.getString("liaotiandikuang","")));//聊天框
        list.add(new FiedValue(305, role.getGid()));
        list.add(new FiedValue(445, 0));
        list.add(new FiedValue(31, role.getLevel()));
        list.add(new FiedValue(40, role.getRoleIcon()));
        list.add(new FiedValue(3023, propsStatus == null ?"":propsStatus.getString("touxiangkuang",""))); // 头像框
        return list;
    }

    public static List<FiedValue> listFightExtra(FightObject fightObject) {
        NutMap status = fightObject.getStatusMap();
        List<FiedValue> list = new ArrayList<>();
        list.add(new FiedValue(31, fightObject.getLevel()));
        list.add(new FiedValue(44, fightObject.getPolar()));
        list.add(new FiedValue(829, status.getInt(String.valueOf(StatusConst.STATUS_SPEED_UP), 0)));
        list.add(new FiedValue(830, status.getInt(String.valueOf(StatusConst.STATUS_PHY_POWER_UP), 0)));
        list.add(new FiedValue(833, status.getInt(String.valueOf(StatusConst.STATUS_DODGE_UP), 0)));
        list.add(new FiedValue(834, status.getInt(String.valueOf(StatusConst.STATUS_DEF_UP), 0)));
        list.add(new FiedValue(835, status.getInt(String.valueOf(StatusConst.STATUS_RECOVER_LIFE), 0)));
        //乾坤罩持续回合数
        list.add(new FiedValue(843, status.getInt(String.valueOf(StatusConst.STATUS_PASSIVE_ATTACK), 0)));
        //神龙罩持续回合数
        list.add(new FiedValue(846, status.getInt(String.valueOf(StatusConst.STATUS_IMMUNE_PHY_DAMAGE), 0)));
        //如意圈持续回合数
        list.add(new FiedValue(847, status.getInt(String.valueOf(StatusConst.STATUS_IMMUNE_MAG_DAMAGE), 0)));
        //五色持续回合数
        list.add(new FiedValue(851, status.getInt(String.valueOf(StatusConst.STATUS_PASSIVE_MAG_ATTACK), 0)));
        //嘲讽持续回合数
        list.add(new FiedValue(904, status.getInt(String.valueOf(StatusConst.STATUS_CHAOFENG), 0)));
        //颠倒持续回合数
        list.add(new FiedValue(905, status.getInt(String.valueOf(StatusConst.STATUS_DIANDAO_QIANKUN), 0)));
        //金刚圈持续回合数
        list.add(new FiedValue(906, status.getInt(String.valueOf(StatusConst.STATUS_JINGANGQUAN), 0)));
        //天眼持续回合数
        //list.add(new FiedValue(908, status.getInt(String.valueOf(StatusConst.STATUS_CHAOFENG), 0)));
        list.add(new FiedValue(912, status.getInt(StatusConst.STATUS_RECOVER_LIFE + "value", 0)));
        list.add(new FiedValue(913, status.getInt(StatusConst.STATUS_DEF_UP + "value", 0)));
        list.add(new FiedValue(914, status.getInt(StatusConst.STATUS_PHY_POWER_UP + "value", 0)));
        list.add(new FiedValue(915, new Double(status.getInt(StatusConst.STATUS_PHY_POWER_UP + "value", 0) * 0.75).intValue()));
        list.add(new FiedValue(916, status.getInt(StatusConst.STATUS_SPEED_UP + "value", 0)));
        return list;
    }

    public static List<FiedValue> mapInfo(Role role,int mapId) {
        List<FiedValue> list = new ArrayList<>();
        list.add(new FiedValue(439, 1));
        list.add(new FiedValue(440, 1));
        list.add(new FiedValue(441, 0));
        list.add(new FiedValue(442, mapId));
        //内丹属性点
        NeidanProp neidanProp = role.getExtendBox().getNeidanProp();
        if(neidanProp != null){
            list.add(new FiedValue(443,neidanProp.getTotalAttribPoint()));//累计属性
            list.add(new FiedValue(444, neidanProp.getTotalPolarPoint()));//累计相性
        }else{
            list.add(new FiedValue(443,0));//累计属性
            list.add(new FiedValue(444, 0));//累计相性
        }
        return list;
    }

    /**
     * 登录界面 角色列表
     * @param role
     * @param online
     * @return
     */
    public static List<FiedValue> roleInfo(PlayerProfile role, byte online) {
        List<FiedValue> list = new ArrayList<>();
        list.add(new FiedValue(263, 3, 0));//删除角色剩余时间
        list.add(new FiedValue(435, 1, online));//在线状态
        list.add(new FiedValue(428, 4, ""));//role.getDistName()
        list.add(new FiedValue(86, 7, role.getRoleIcon()));
        list.add(new FiedValue(429, 1, (byte) 0));//角色是否在交易
        list.add(new FiedValue(437, 4, ""));//指定交易人的名称
        list.add(new FiedValue(430, 3, 0));//交易剩余时间
        list.add(new FiedValue(31, 2, role.getLevel()));
        list.add(new FiedValue(44, 2, role.getPolar()));
        list.add(new FiedValue(40, 7, role.getRoleIcon()));
        list.add(new FiedValue(432, 3, 0));//交易价格
        list.add(new FiedValue(1, 4, role.getName()));
        list.add(new FiedValue(305, 4, String.valueOf(role.getGid())));
        list.add(new FiedValue(438, 3, 0));//买断价
        list.add(new FiedValue(434, 2, 0));//交易价格
        list.add(new FiedValue(431, 3, 0));//交易价格
        list.add(new FiedValue(436, 1, 0));//交易类型
        return list;
    }

    public static List<FiedValue> roleInfo(Role role, byte online) {
        List<FiedValue> list = new ArrayList<>();
        list.add(new FiedValue(263, 3, 0));//删除角色剩余时间
        list.add(new FiedValue(435, 1, online));//在线状态
        list.add(new FiedValue(428, 4, ""));
        list.add(new FiedValue(86, 7, role.getRoleIcon()));
        list.add(new FiedValue(429, 1, (byte) 0));//角色是否在交易
        list.add(new FiedValue(437, 4, ""));//指定交易人的名称
        list.add(new FiedValue(430, 3, 0));//交易剩余时间
        list.add(new FiedValue(31, 2, role.getLevel()));
        list.add(new FiedValue(44, 2, role.getPolar()));
        list.add(new FiedValue(40, 7, role.getRoleIcon()));
        list.add(new FiedValue(432, 3, 0));//交易价格
        list.add(new FiedValue(1, 4, role.getName()));
        list.add(new FiedValue(305, 4, String.valueOf(role.getGid())));
        list.add(new FiedValue(438, 3, 0));//买断价
        list.add(new FiedValue(434, 2, 0));//交易价格
        list.add(new FiedValue(431, 3, 0));//交易价格
        list.add(new FiedValue(436, 1, 0));//交易类型
        return list;
    }

    public static void sendChangeIcon(Role role) {
        RespUpdate respUpdate = new RespUpdate();
        respUpdate.setRoleId(role.getRoleId());
        int icon = 0;
        if (role.getShapePen() != null) {
            icon = role.getShapePen().getIcon();
        } else if (role.getChangeCard() != null) {
            icon = role.getChangeCard().getIcon();
        } else {
            icon = role.getRoleIcon();
        }
        List<FiedValue> values = new ArrayList<>(Collections.singletonList(new FiedValue(86, icon)));
        respUpdate.setList(values);
        MessagePusher.pushMessage(role, respUpdate);
    }

    public static List<FiedValue> roleShuxin(Role role){
        List<FiedValue> list = new ArrayList<>();
        RoleService roleService = SpringUtils.getBean(RoleService.class);
        CountService countService = SpringUtils.getBean(CountService.class);
        HunPoService hunPoService = SpringUtils.getBean(HunPoService.class);
        list.add(new FiedValue(1, role.getName()));
        list.add(new FiedValue(2, role.getStr() + role.getExtendBox().getBasicAttrib().getStr()));
        list.add(new FiedValue(5, role.getCon() + role.getExtendBox().getBasicAttrib().getCon()));
        list.add(new FiedValue(9, role.getWiz() + role.getExtendBox().getBasicAttrib().getWiz()));
        list.add(new FiedValue(13, role.getDex() + role.getExtendBox().getBasicAttrib().getDex()));
//        LoggerFactory.getLogger("999999999999999999").error("属性=={}=={}=={}=={}=={}=={}",role.getStr(),role.getCon(),role.getWiz(),role.getDex(), Json.toJson(role.getExtendBox().getBasicAttrib()));
        list.add(new FiedValue(6, role.getCurrLife()));
        list.add(new FiedValue(11, role.getCurrMana()));
        list.add(new FiedValue(3, countService.countBasicPhyPower(role)));
        list.add(new FiedValue(7, countService.countBasicLife(role)));
        list.add(new FiedValue(8, countService.countBasicDefense(role)));
        list.add(new FiedValue(31, role.getLevel()));

        list.add(new FiedValue(10, countService.countBasicMagPower(role)));
        list.add(new FiedValue(12, countService.countBasicMana(role)));
        list.add(new FiedValue(14, countService.countBasicSpeed(role)));
        list.add(new FiedValue(15, role.getParry()));
        list.add(new FiedValue(16, role.getLastAttrib()));
        list.add(new FiedValue(17, role.getLastPolar()));
        list.add(new FiedValue(18, role.getCurrStamina()));
        list.add(new FiedValue(19, role.getMaxStamina()));
        list.add(new FiedValue(20, role.getTao()));
        list.add(new FiedValue(36, role.getCurrTitle()));
        list.add(new FiedValue(44, role.getPolar()));  //1金 2木 3水 4火 5土
        list.add(new FiedValue(45, role.getMetal()));
        list.add(new FiedValue(46, role.getWood()));
        list.add(new FiedValue(47, role.getWater()));
        list.add(new FiedValue(48, role.getFire()));
        list.add(new FiedValue(49, role.getEarth()));
        list.add(new FiedValue(119, role.getSiver()));
        list.add(new FiedValue(120, SpringUtils.getAccountService().getAccount(role.getSid()).getGold()));
        list.add(new FiedValue(121, role.getSaveLife()));
        list.add(new FiedValue(122, role.getSaveMana()));
        // add tao: 实时刷新忠诚度
        list.add(new FiedValue(178, role.getSaveLoyalty()));
        // add:e
        NutMap propsStatus = role.getPropsStatus();
        list.add(new FiedValue(191,3, propsStatus.getInt("role", 0)));//双倍点数
        list.add(new FiedValue(192, propsStatus.getInt("roleStatus", 0)));//双倍开启
        list.add(new FiedValue(875,3, propsStatus.getInt("shenmu", 0)));//双倍点数
        list.add(new FiedValue(876, propsStatus.getInt("shenmuStatus", 0)));//双倍开启
        list.add(new FiedValue(3002,3, propsStatus.getInt("pet", 0)));//宠风散点数
        list.add(new FiedValue(900,3, propsStatus.getInt("ziqi", 0)));//紫气鸿蒙
        list.add(new FiedValue(918,3, propsStatus.getInt("ruyi", 0)));//如意刷道令
        list.add(new FiedValue(312, propsStatus.getInt("manguai", 0)));
        list.add(new FiedValue(34, SpringUtils.getPartyService().getContrib(role)));
        ChildInfo child = role.getChildInfo();
        list.add(new FiedValue(340, child.getState()));//upgrade/state  todo 飞升状态 0真身 1 元婴   2血婴  跟面板的Icon有关  1对应下面的 1 3  2对应下面的 2 4
        list.add(new FiedValue(341, child.getType()));//upgrade/type // todo 飞升的类型  0 未获得    1 元婴   2血婴   3仙  4魔
        list.add(new FiedValue(342, child.getLevel()));//upgrade/level  可能是元婴的等级
        //仙魔点
        /**坐骑增益*/
        int mountXian = 0;
        int mountMo = 0;
        if (role.getMount() >= 1) {
            Pet mount = SpringUtils.getPetService().getPetById(role.getMount(), role);
            if (mount != null) {
                int currTime = new Long(new Date().getTime() / 1000).intValue();
                if (mount.getMountTime() > currTime) {//风灵丸时间大于当前时间才给计算增益属性
                    List<FiedValue> fieldList = SpringUtils.getBean(PetService.class).getMountAttrib(mount).getFieldValues();
                    for (FiedValue fiedValue : fieldList) {
                        if(fiedValue.getType() == 925){
                            mountXian = Integer.parseInt(fiedValue.getValue().toString());
                        }
                        if(fiedValue.getType() == 926){
                            mountMo = Integer.parseInt(fiedValue.getValue().toString());
                        }

                    }
                }
            }
        }
        ChildInfo info = role.getChildInfo();
        list.add(new FiedValue(925, info.getXian()+mountXian));
        list.add(new FiedValue(926, info.getMo()+mountMo));
        list.add(new FiedValue(927, info.getUpgradeTotal()));
        return list;
    }
    /**
     * 取角色面板信息——用于发出去显示
     *
     * @param role
     * @return
     */
    public static List<FiedValue> rolePanelInfo_1(Role role) {
        List<FiedValue> list = new ArrayList<>();
        RoleService roleService = SpringUtils.getBean(RoleService.class);
        CountService countService = SpringUtils.getBean(CountService.class);
        HunPoService hunPoService = SpringUtils.getBean(HunPoService.class);
        list.add(new FiedValue(1, role.getName()));
        list.add(new FiedValue(2, role.getStr() + role.getExtendBox().getBasicAttrib().getStr()));
        list.add(new FiedValue(5, role.getCon() + role.getExtendBox().getBasicAttrib().getCon()));
        list.add(new FiedValue(9, role.getWiz() + role.getExtendBox().getBasicAttrib().getWiz()));
        list.add(new FiedValue(13, role.getDex() + role.getExtendBox().getBasicAttrib().getDex()));
        list.add(new FiedValue(6, role.getCurrLife()));
        list.add(new FiedValue(11, role.getCurrMana()));
        //role.getMaxPhyPower()
        list.add(new FiedValue(3, role.getMaxPhyPower()));
        //list.add(new FiedValue(3, countService.countBasicPhyPower(role)));

        //套装效果
        list.add(new FiedValue(295, role.getSuitLightId()));//Todo 套装光效 7001-7005
        list.add(new FiedValue(290, role.getWeaponIcon()));//todo 武器的Icon
        list.add(new FiedValue(291, role.getSuitId()));//Todo 套装的ID


        list.add(new FiedValue(7, role.getMaxLife()));
        list.add(new FiedValue(8, role.getMaxDefense()));
        list.add(new FiedValue(10, role.getMaxMagPower()));
        list.add(new FiedValue(12, role.getMaxMana()));
        list.add(new FiedValue(14, role.getMaxSpeed()));

        list.add(new FiedValue(15, role.getParry()));
        list.add(new FiedValue(44, role.getPolar()));  //1金 2木 3水 4火 5土
        list.add(new FiedValue(45, role.getMetal()));
        list.add(new FiedValue(46, role.getWood()));
        list.add(new FiedValue(47, role.getWater()));
        list.add(new FiedValue(48, role.getFire()));
        list.add(new FiedValue(49, role.getEarth()));

        list.add(new FiedValue(50, 0));
        list.add(new FiedValue(51, 0));
        list.add(new FiedValue(52, 0));
        list.add(new FiedValue(53, 0));
        list.add(new FiedValue(54, 0));
        list.add(new FiedValue(16, role.getLastAttrib()));
        list.add(new FiedValue(17, role.getLastPolar()));
        list.add(new FiedValue(18, role.getCurrStamina()));
        list.add(new FiedValue(19, role.getMaxStamina()));
        list.add(new FiedValue(20, role.getTao()));
        list.add(new FiedValue(493, 3,role.getfight_cap()));////z战力
        list.add(new FiedValue(500, 3,role.getfight_cap_total()*2));////z战力总和
        //  list.add(new FiedValue(493, role.getfight_cap()));////z战力
        //  list.add(new FiedValue(500, role.getfight_cap_total()));////z战力总和
        list.add(new FiedValue(175, role.getTaoLastPoint()));//道行点数
        list.add(new FiedValue(23, 0));//total_pk 总pk次数?
        list.add(new FiedValue(24, 0));//
        list.add(new FiedValue(25, role.getExp()));
        list.add(new FiedValue(26, role.getPot()));
        list.add(new FiedValue(27, role.getMoney()));
        list.add(new FiedValue(28, role.getStoreMoney()));
        list.add(new FiedValue(124, 2000000000));
        list.add(new FiedValue(125, 2000000000));
        list.add(new FiedValue(29, role.getGender()));

        list.add(new FiedValue(30, ""));//师傅名字
        list.add(new FiedValue(31, role.getLevel()));
        list.add(new FiedValue(33, role.getPartyName()));
        list.add(new FiedValue(939, String.valueOf(role.getPartyId())));
        list.add(new FiedValue(34, SpringUtils.getPartyService().getContrib(role)));
        list.add(new FiedValue(97, SpringUtils.getPartyService().getPartyJob(role)));
        list.add(new FiedValue(35, ""));//nick
        list.add(new FiedValue(36, role.getCurrTitle()));
        list.add(new FiedValue(37, 0));
        list.add(new FiedValue(38, role.getReputation()));

        list.add(new FiedValue(39, ""));//couple
        list.add(new FiedValue(40, role.getRoleIcon()));
        list.add(new FiedValue(55, roleService.getRoleUpgradeNeedExp(role.getLevel())));
        list.add(new FiedValue(75, role.getTotalScore()));
        list.add(new FiedValue(83, 0));//总死亡次数total_died
        list.add(new FiedValue(86, role.getShapePen() != null ? role.getShapePen().getIcon() : role.getChangeCard() != null ? role.getChangeCard().getIcon() : role.getRoleIcon()));
        list.add(new FiedValue(81, roleService.getFamilyName(role.getPolar())));
        list.add(new FiedValue(110, 0));//penetrate
        list.add(new FiedValue(260, 0));//to_be_deleted  删除角色?
        list.add(new FiedValue(263, 0));//left_time_to_delete 删除角色剩余时间

        list.add(new FiedValue(119, role.getSiver()));
        list.add(new FiedValue(120, SpringUtils.getAccountService().getAccount(role.getSid()).getGold()));
        list.add(new FiedValue(121, role.getSaveLife()));
        list.add(new FiedValue(122, role.getSaveMana()));
        list.add(new FiedValue(214, role.getEquipPage()));//装备页 0是第一页 1是第二页
        list.add(new FiedValue(178, role.getSaveLoyalty()));//储备忠诚驯化宝宝用
        list.add(new FiedValue(190, 0));//practice_times
        list.add(new FiedValue(191,3, role.getPropsStatus().getInt("role", 0)));//双倍点数
        list.add(new FiedValue(192, role.getPropsStatus().getInt("roleStatus", 0)));//双倍开启
        list.add(new FiedValue(875,3, role.getPropsStatus().getInt("shenmu", 0)));//双倍点数

        list.add(new FiedValue(876, role.getPropsStatus().getInt("shenmuStatus", 0)));//双倍开启
        list.add(new FiedValue(193, 0));//can_buy_dp_times 能购买双倍点数次数??
        list.add(new FiedValue(308, 0));//free_rename 免费改名?
        list.add(new FiedValue(195, 0));//arena_rank
        list.add(new FiedValue(309, role.getVoucher()));//代金券
        list.add(new FiedValue(310, role.isUseVoucher() ? 1 : 0)); //使用代金券 1使用代金券 0使用游戏币
        list.add(new FiedValue(311, (role.isLockexp() ? 1 : 0))); //锁定经验
        list.add(new FiedValue(330, 0)); //free_unlock_exp_times
        list.add(new FiedValue(199, 0)); //store_exp  储备经验
        list.add(new FiedValue(312, role.getPropsStatus().getInt("manguai", 0)));
        list.add(new FiedValue(37, role.getNice()));
        list.add(new FiedValue(313, role.getNiceszhi()));
        list.add(new FiedValue(488, role.getMijingjifen()));
        list.add(new FiedValue(1086, role.getExtendBox().getZhengdaoLevel()));
//        list.add(new FiedValue(37, 0));//nice ??
//        list.add(new FiedValue(313, 0));//fetch_nice ??
        list.add(new FiedValue(868, role.getExtendBox().getWelfare().getOrDefault("lotteryDraw", 0)));//充值抽奖次数
        list.add(new FiedValue(314, 0));//recharge  充值??
        list.add(new FiedValue(200, role.getEquipIdentify())); //鉴定进度
        list.add(new FiedValue(869, 0));//shadow_self
        list.add(new FiedValue(2000, 0));//shidao-dahui
        list.add(new FiedValue(216, 0));//create_time 角色创建时间?
        list.add(new FiedValue(3000, ""));//marriage/marry_id
        list.add(new FiedValue(3002,3, role.getPropsStatus().getInt("pet", 0)));//宠风散点数

        list.add(new FiedValue(900,3, role.getPropsStatus().getInt("ziqi", 0)));//紫气鸿蒙
        list.add(new FiedValue(918,3, role.getPropsStatus().getInt("ruyi", 0)));//如意刷道令
        list.add(new FiedValue(3009, role.getFriendBox().getStrangerLevel()));//拒绝陌生人等级
        list.add(new FiedValue(3010, ""));//自动回复消息setting/auto_reply_msg
        list.add(new FiedValue(3011, role.getFriendBox().getRefuseLevel()));//拒绝陌生人添加好友等级
        list.add(new FiedValue(882, 0));//mailing_item_times  物品邮寄次数
        list.add(new FiedValue(217, 0));//ct_data/score
        list.add(new FiedValue(218, 0));//ct_data/top_rank
        list.add(new FiedValue(3013, 0));//bully_kill_num  应该是被强P杀死的次数
        list.add(new FiedValue(3014, 0));//police_kill_num  应该是被强P杀死别人的次数

        list.add(new FiedValue(3016, 0));//gm_attribs/max_life  GM属性?
        list.add(new FiedValue(3017, 0));//gm_attribs/max_mana  GM属性?
        list.add(new FiedValue(3018, 0));//gm_attribs/phy_power  GM属性?
        list.add(new FiedValue(3019, 0));//gm_attribs/mag_power  GM属性?
        list.add(new FiedValue(3020, 0));//gm_attribs/def  GM属性?
        list.add(new FiedValue(3021, 0));//gm_attribs/speed  GM属性?
        list.add(new FiedValue(917, ""));//brother/appellation 结拜称谓
        ChildInfo child = role.getChildInfo();
        list.add(new FiedValue(340, child.getState()));//upgrade/state  todo 飞升状态 0真身 1 元婴   2血婴  跟面板的Icon有关  1对应下面的 1 3  2对应下面的 2 4
        list.add(new FiedValue(341, child.getType()));//upgrade/type // todo 飞升的类型  0 未获得    1 元婴   2血婴   3仙  4魔
        list.add(new FiedValue(342, child.getLevel()));//upgrade/level  可能是元婴的等级

        list.add(new FiedValue(343, child.getExp()));//upgrade/exp  可能是元婴的经验
        list.add(new FiedValue(345, child.getMaxPolarExtra()));//upgrade/max_polar_extra  元婴增加的相性上限 每7级增加一点
        list.add(new FiedValue(344, (int)child.getUpgradeExp()));//upgrade/exp_to_next_level  升级下级需要的经验
        list.add(new FiedValue(925, child.getXian())); //仙道点
        list.add(new FiedValue(926, child.getMo())); //魔道点
        list.add(new FiedValue(927, child.getUpgradeTotal()));//upgrade/total  剩余仙魔点
        list.add(new FiedValue(250, role.getExtendBox().getHouseId())); //house/id  房屋ID
        list.add(new FiedValue(251, 0)); //house/house_class  房屋等级?
        list.add(new FiedValue(919, 0)); //chushi_ex
        list.add(new FiedValue(252, 0)); //plant_level 植物等级?

        list.add(new FiedValue(253, 0)); //plant_exp 植物经验?
        list.add(new FiedValue(3022, "")); //marriage/couple_gid 应该是结婚的目标的GID
        list.add(new FiedValue(457, "")); //marriage/book_id 应该是结婚相关的
        list.add(new FiedValue(2002, 0)); //open_state 什么的开启状态?
        list.add(new FiedValue(439, 0)); //dan_data/state
//        list.add(new FiedValue(439, 1));
        list.add(new FiedValue(441, 0));
        //内丹属性点
        NeidanProp neidanProp = role.getExtendBox().getNeidanProp();
        if(neidanProp != null){
            list.add(new FiedValue(443,neidanProp.getTotalAttribPoint()));//累计属性
            list.add(new FiedValue(444, neidanProp.getTotalPolarPoint()));//累计相性
        }else{
            list.add(new FiedValue(443,0));//累计属性
            list.add(new FiedValue(444, 0));//累计相性
        }
        list.add(new FiedValue(442, 0));
        list.add(new FiedValue(1086, role.getExtendBox().getZhengdaoLevel()));
        list.add(new FiedValue(440, 1));
        list.add(new FiedValue(447, 0));
        list.add(new FiedValue(446, 0));
        list.add(new FiedValue(450, role.getJewelryEssence())); //首饰精华数量
        list.add(new FiedValue(455, 0));//fasion_custom_disable  应该是穿了时装之后开关时装的
        list.add(new FiedValue(456, 0));//fasion_effect_disable  应该是穿了特效的开关
        list.add(new FiedValue(307, role.getAutoFight()));//自动战斗
        list.add(new FiedValue(458, role.getJewelryStrengthenCount()));////首饰强化的时间
        list.add(new FiedValue(462, role.getMonthTao()));//月道行
        list.add(new FiedValue(463, role.getMonthTaoLastPoint()));

        list.add(new FiedValue(464, role.getPrevMonthTao()));
        list.add(new FiedValue(465, role.getPrevMonthTaoLastPoint()));
        Fuling fuling = SpringUtils.getFulingService().getFulingdata(role.getRoleId());

        if(fuling!=null){
            list.add(new FiedValue(1005, fuling.getType1()));//真灵类型
            if(fuling.getType1()==1){
                list.add(new FiedValue(1006, fuling.getQinglong()));//真灵等级
            }else if(fuling.getType1()==2){
                list.add(new FiedValue(1006, fuling.getZhuque()));//真灵等级
            }else if(fuling.getType1()==3){
                list.add(new FiedValue(1006, fuling.getBaihu()));//真灵等级
            }else if(fuling.getType1()==4){
                list.add(new FiedValue(1006, fuling.getXuanwu()));//真灵等级
            }
        }
        //悟道
        HunPoProp hunPoProp = hunPoService.getHunPoProp(role);
        list.add(new FiedValue(0x01D5, hunPoProp.getLevel() > 10 ?10:hunPoProp.getLevel()));//神魂阶
        list.add(new FiedValue(0x01D6, hunPoProp.getLevelInner()));//神魂子阶
        list.add(new FiedValue(0x01D7, hunPoProp.getYinDe()));//阴德
        list.add(new FiedValue(0x01D8, hunPoService.getStageUpReq(hunPoProp.getLevel(), hunPoProp.getLevelInner())));//升级需要

        {
            list.add(new FiedValue(487, 0));
            list.add(new FiedValue(375, 3,0));
            list.add(new FiedValue(376, 3,0));
            list.add(new FiedValue(946, 1,25));
            list.add(new FiedValue(358, 3,0));
            list.add(new FiedValue(359, 3,0));
            list.add(new FiedValue(360, 3,0));
            list.add(new FiedValue(361, 1,0));
            list.add(new FiedValue(362, 1,0));
            list.add(new FiedValue(955, 1,0));
            list.add(new FiedValue(956, 3,1120));
            list.add(new FiedValue(959, 1,0));
            list.add(new FiedValue(960, 3,0));
            list.add(new FiedValue(469, 1,1));
            list.add(new FiedValue(470, 1,0));
            list.add(new FiedValue(471, 3,0));
            list.add(new FiedValue(472, 3,250));
            list.add(new FiedValue(473, 3,0));
            list.add(new FiedValue(980, 2,15));
            list.add(new FiedValue(981, 3,10));
            list.add(new FiedValue(982, 1,3));
            list.add(new FiedValue(3028, 3,35));
            list.add(new FiedValue(411, 3,0));
            list.add(new FiedValue(995, 1,0));
        }
        return list;
    }
    /**
     * 取角色面板信息
     *
     * @param role
     * @return
     */
    public static List<FiedValue> rolePanelInfo(Role role) {
        List<FiedValue> list = new ArrayList<>();
        RoleService roleService = SpringUtils.getBean(RoleService.class);
        CountService countService = SpringUtils.getBean(CountService.class);
        HunPoService hunPoService = SpringUtils.getBean(HunPoService.class);
        WuHunService_ wuHunService_ = SpringUtils.getBean(WuHunService_.class);

        list.add(new FiedValue(1, role.getName()));
        list.add(new FiedValue(2, role.getStr() + role.getExtendBox().getBasicAttrib().getStr()));
        list.add(new FiedValue(5, role.getCon() + role.getExtendBox().getBasicAttrib().getCon()));
        list.add(new FiedValue(9, role.getWiz() + role.getExtendBox().getBasicAttrib().getWiz()));
        list.add(new FiedValue(13, role.getDex() + role.getExtendBox().getBasicAttrib().getDex()));
        list.add(new FiedValue(6, role.getCurrLife()));
        list.add(new FiedValue(11, role.getCurrMana()));
        //role.getMaxPhyPower()
        list.add(new FiedValue(3, countService.countBasicPhyPower(role)));
        //list.add(new FiedValue(3, countService.countBasicPhyPower(role)));
        list.add(new FiedValue(7, countService.countBasicLife(role)));
        list.add(new FiedValue(8, countService.countBasicDefense(role)));

        list.add(new FiedValue(10, countService.countBasicMagPower(role)));
        list.add(new FiedValue(12, countService.countBasicMana(role)));
        list.add(new FiedValue(14, countService.countBasicSpeed(role)));
        list.add(new FiedValue(15, role.getParry()));
        list.add(new FiedValue(44, role.getPolar()));  //1金 2木 3水 4火 5土
        list.add(new FiedValue(45, role.getMetal()));
        list.add(new FiedValue(46, role.getWood()));
        list.add(new FiedValue(47, role.getWater()));
        list.add(new FiedValue(48, role.getFire()));
        list.add(new FiedValue(49, role.getEarth()));

        list.add(new FiedValue(50, 0));
        list.add(new FiedValue(51, 0));
        list.add(new FiedValue(52, 0));
        list.add(new FiedValue(53, 0));
        list.add(new FiedValue(54, 0));
        list.add(new FiedValue(16, role.getLastAttrib()));
        list.add(new FiedValue(17, role.getLastPolar()));
        list.add(new FiedValue(18, role.getCurrStamina()));
        list.add(new FiedValue(19, role.getMaxStamina()));
        list.add(new FiedValue(20, role.getTao()));
         list.add(new FiedValue(493, 3,role.getfight_cap()));////z战力
         list.add(new FiedValue(500, 3,role.getfight_cap_total()));////z战力总和
        list.add(new FiedValue(175, role.getTaoLastPoint()));//道行点数
        list.add(new FiedValue(1086, role.getExtendBox().getZhengdaoLevel()));


        list.add(new FiedValue(23, 0));//total_pk 总pk次数?
        list.add(new FiedValue(24, 0));//
        list.add(new FiedValue(25, role.getExp()));
        list.add(new FiedValue(26, role.getPot()));
        list.add(new FiedValue(27, role.getMoney()));
        list.add(new FiedValue(28, role.getStoreMoney()));
        list.add(new FiedValue(124, 2000000000));
        list.add(new FiedValue(125, 2000000000));
        list.add(new FiedValue(29, role.getGender()));

        list.add(new FiedValue(30, ""));//师傅名字
        list.add(new FiedValue(31, role.getLevel()));
        list.add(new FiedValue(33, role.getPartyName()));
        list.add(new FiedValue(939, String.valueOf(role.getPartyId())));
        list.add(new FiedValue(34, SpringUtils.getPartyService().getContrib(role)));
        list.add(new FiedValue(97, SpringUtils.getPartyService().getPartyJob(role)));
        list.add(new FiedValue(35, ""));//nick
        list.add(new FiedValue(36, role.getCurrTitle()));
        list.add(new FiedValue(37, 0));
        list.add(new FiedValue(38, role.getReputation()));

        list.add(new FiedValue(39, ""));//couple
        list.add(new FiedValue(40, role.getRoleIcon()));
        list.add(new FiedValue(55, roleService.getRoleUpgradeNeedExp(role.getLevel())));
        list.add(new FiedValue(75, role.getTotalScore()));
        list.add(new FiedValue(83, 0));//总死亡次数total_died
        list.add(new FiedValue(86, role.getShapePen() != null ? role.getShapePen().getIcon() : role.getChangeCard() != null ? role.getChangeCard().getIcon() : role.getRoleIcon()));
        list.add(new FiedValue(81, roleService.getFamilyName(role.getPolar())));
        list.add(new FiedValue(110, 0));//penetrate
        list.add(new FiedValue(260, 0));//to_be_deleted  删除角色?
        list.add(new FiedValue(263, 0));//left_time_to_delete 删除角色剩余时间

        list.add(new FiedValue(119, role.getSiver()));
        list.add(new FiedValue(120, SpringUtils.getAccountService().getAccount(role.getSid()).getGold()));
        list.add(new FiedValue(121, role.getSaveLife()));
        list.add(new FiedValue(122, role.getSaveMana()));
        list.add(new FiedValue(214, role.getEquipPage()));//装备页 0是第一页 1是第二页
        list.add(new FiedValue(178, role.getSaveLoyalty()));//储备忠诚驯化宝宝用
        list.add(new FiedValue(190, 0));//practice_times
        list.add(new FiedValue(191,3, role.getPropsStatus().getInt("role", 0)));//双倍点数
        list.add(new FiedValue(192, role.getPropsStatus().getInt("roleStatus", 0)));//双倍开启
        list.add(new FiedValue(875,3, role.getPropsStatus().getInt("shenmu", 0)));//双倍点数



        list.add(new FiedValue(876, role.getPropsStatus().getInt("shenmuStatus", 0)));//双倍开启
        list.add(new FiedValue(193, 0));//can_buy_dp_times 能购买双倍点数次数??
        list.add(new FiedValue(308, 0));//free_rename 免费改名?
        list.add(new FiedValue(195, 0));//arena_rank
        list.add(new FiedValue(309, role.getVoucher()));//代金券
        list.add(new FiedValue(310, role.isUseVoucher() ? 1 : 0)); //使用代金券 1使用代金券 0使用游戏币
        list.add(new FiedValue(311, (role.isLockexp() ? 1 : 0))); //锁定经验
        list.add(new FiedValue(330, 0)); //free_unlock_exp_times
        list.add(new FiedValue(199, 0)); //store_exp  储备经验
        list.add(new FiedValue(312, role.getPropsStatus().getInt("manguai", 0)));
        list.add(new FiedValue(37, role.getNice()));
        list.add(new FiedValue(313, role.getNiceszhi()));
        list.add(new FiedValue(488, role.getMijingjifen()));
//        list.add(new FiedValue(37, 0));//nice ??
//        list.add(new FiedValue(313, 0));//fetch_nice ??
        list.add(new FiedValue(868, role.getExtendBox().getWelfare().getOrDefault("lotteryDraw", 0)));//充值抽奖次数
        list.add(new FiedValue(314, 0));//recharge  充值??
        list.add(new FiedValue(200, role.getEquipIdentify())); //鉴定进度
        list.add(new FiedValue(869, 0));//shadow_self
        list.add(new FiedValue(2000, 0));//shidao-dahui
        list.add(new FiedValue(216, 0));//create_time 角色创建时间?
        list.add(new FiedValue(3000, ""));//marriage/marry_id
        list.add(new FiedValue(3002,3, role.getPropsStatus().getInt("pet", 0)));//宠风散点数

        list.add(new FiedValue(900,3, role.getPropsStatus().getInt("ziqi", 0)));//紫气鸿蒙
        list.add(new FiedValue(918,3, role.getPropsStatus().getInt("ruyi", 0)));//如意刷道令
        list.add(new FiedValue(3009, role.getFriendBox().getStrangerLevel()));//拒绝陌生人等级
        list.add(new FiedValue(3010, ""));//自动回复消息setting/auto_reply_msg
        list.add(new FiedValue(3011, role.getFriendBox().getRefuseLevel()));//拒绝陌生人添加好友等级
        list.add(new FiedValue(882, 0));//mailing_item_times  物品邮寄次数
        list.add(new FiedValue(217, 0));//ct_data/score
        list.add(new FiedValue(218, 0));//ct_data/top_rank
        list.add(new FiedValue(3013, 0));//bully_kill_num  应该是被强P杀死的次数
        list.add(new FiedValue(3014, 0));//police_kill_num  应该是被强P杀死别人的次数

        list.add(new FiedValue(3016, 0));//gm_attribs/max_life  GM属性?
        list.add(new FiedValue(3017, 0));//gm_attribs/max_mana  GM属性?
        list.add(new FiedValue(3018, 0));//gm_attribs/phy_power  GM属性?
        list.add(new FiedValue(3019, 0));//gm_attribs/mag_power  GM属性?
        list.add(new FiedValue(3020, 0));//gm_attribs/def  GM属性?
        list.add(new FiedValue(3021, 0));//gm_attribs/speed  GM属性?
        list.add(new FiedValue(917, ""));//brother/appellation 结拜称谓
        ChildInfo child = role.getChildInfo();
        list.add(new FiedValue(340, child.getState()));//upgrade/state  todo 飞升状态 0真身 1 元婴   2血婴  跟面板的Icon有关  1对应下面的 1 3  2对应下面的 2 4
        list.add(new FiedValue(341, child.getType()));//upgrade/type // todo 飞升的类型  0 未获得    1 元婴   2血婴   3仙  4魔
        list.add(new FiedValue(342, child.getLevel()));//upgrade/level  可能是元婴的等级

        list.add(new FiedValue(343, child.getExp()));//upgrade/exp  可能是元婴的经验
        list.add(new FiedValue(345, child.getMaxPolarExtra()));//upgrade/max_polar_extra  元婴增加的相性上限 每7级增加一点
        list.add(new FiedValue(344, (int)child.getUpgradeExp()));//upgrade/exp_to_next_level  升级下级需要的经验
        list.add(new FiedValue(925, child.getXian())); //仙道点
        list.add(new FiedValue(926, child.getMo())); //魔道点
        list.add(new FiedValue(927, child.getUpgradeTotal()));//upgrade/total  剩余仙魔点
        list.add(new FiedValue(250, role.getExtendBox().getHouseId())); //house/id  房屋ID
        list.add(new FiedValue(251, 0)); //house/house_class  房屋等级?
        list.add(new FiedValue(919, 0)); //chushi_ex
        list.add(new FiedValue(252, 0)); //plant_level 植物等级?

        list.add(new FiedValue(253, 0)); //plant_exp 植物经验?
        list.add(new FiedValue(3022, "")); //marriage/couple_gid 应该是结婚的目标的GID
        list.add(new FiedValue(457, "")); //marriage/book_id 应该是结婚相关的
        list.add(new FiedValue(2002, 0)); //open_state 什么的开启状态?
        list.add(new FiedValue(439, 0)); //dan_data/state
//        list.add(new FiedValue(439, 1));
        list.add(new FiedValue(441, 0));
        //内丹属性点
        NeidanProp neidanProp = role.getExtendBox().getNeidanProp();
        if(neidanProp != null){
            list.add(new FiedValue(443,neidanProp.getTotalAttribPoint()));//累计属性
            list.add(new FiedValue(444, neidanProp.getTotalPolarPoint()));//累计相性
        }else{
            list.add(new FiedValue(443,0));//累计属性
            list.add(new FiedValue(444, 0));//累计相性
        }


        list.add(new FiedValue(442, 0));

        list.add(new FiedValue(440, 1));
        list.add(new FiedValue(447, 0));
        list.add(new FiedValue(446, 0));
        list.add(new FiedValue(450, role.getJewelryEssence())); //首饰精华数量
        list.add(new FiedValue(455, 0));//fasion_custom_disable  应该是穿了时装之后开关时装的
        list.add(new FiedValue(456, 0));//fasion_effect_disable  应该是穿了特效的开关
        list.add(new FiedValue(307, role.getAutoFight()));//自动战斗
        list.add(new FiedValue(458, role.getJewelryStrengthenCount()));////首饰强化的时间
        list.add(new FiedValue(462, role.getMonthTao()));//月道行
        list.add(new FiedValue(463, role.getMonthTaoLastPoint()));

        list.add(new FiedValue(464, role.getPrevMonthTao()));
        list.add(new FiedValue(465, role.getPrevMonthTaoLastPoint()));
        Fuling fuling = SpringUtils.getFulingService().getFulingdata(role.getRoleId());

        if(fuling!=null){
            list.add(new FiedValue(1005, fuling.getType1()));//真灵类型
            if(fuling.getType1()==1){
                list.add(new FiedValue(1006, fuling.getQinglong()));//真灵等级
            }else if(fuling.getType1()==2){
                list.add(new FiedValue(1006, fuling.getZhuque()));//真灵等级
            }else if(fuling.getType1()==3){
                list.add(new FiedValue(1006, fuling.getBaihu()));//真灵等级
            }else if(fuling.getType1()==4){
                list.add(new FiedValue(1006, fuling.getXuanwu()));//真灵等级
            }
        }
        WuHunPoProp wuHunPoProp = wuHunService_.getWuHunPoProp(role);

        int lc = wuHunPoProp.getLevel();//wuHunPoProp.getLevelInner();
        int jc =(lc-1)*100;
        list.add(new FiedValue(495, 3,jc+wuHunPoProp.getLevelInner()));//wuhun_data/level
        list.add(new FiedValue(496, 3,wuHunPoProp.getWulingzhi()));//wuhun_data/exp
        list.add(new FiedValue(497, 3,wuHunService_.getStageUpReq(wuHunPoProp.getLevel(), wuHunPoProp.getLevelInner())));//exp_to_next_level
        list.add(new FiedValue(498, 3,0));//whzc_num
        list.add(new FiedValue(499, 3,0));//wuhunqiao_page

        //悟道
        HunPoProp hunPoProp = hunPoService.getHunPoProp(role);
        list.add(new FiedValue(0x01D5, hunPoProp.getLevel() > 10 ?10:hunPoProp.getLevel()));//神魂阶
        list.add(new FiedValue(0x01D6, hunPoProp.getLevelInner()));//神魂子阶
        list.add(new FiedValue(0x01D7, hunPoProp.getYinDe()));//阴德
        list.add(new FiedValue(0x01D8, hunPoService.getStageUpReq(hunPoProp.getLevel(), hunPoProp.getLevelInner())));//升级需要

        {
            list.add(new FiedValue(487, 0));
            list.add(new FiedValue(375, 3,0));
            list.add(new FiedValue(376, 3,0));
            list.add(new FiedValue(946, 1,25));
            list.add(new FiedValue(358, 3,0));
            list.add(new FiedValue(359, 3,0));
            list.add(new FiedValue(360, 3,0));
            list.add(new FiedValue(361, 1,0));
            list.add(new FiedValue(362, 1,0));
            list.add(new FiedValue(955, 1,0));
            list.add(new FiedValue(956, 3,1120));
            list.add(new FiedValue(959, 1,0));
            list.add(new FiedValue(960, 3,0));
            list.add(new FiedValue(469, 1,1));
            list.add(new FiedValue(470, 1,0));
            list.add(new FiedValue(471, 3,0));
            list.add(new FiedValue(472, 3,250));
            list.add(new FiedValue(473, 3,0));
            list.add(new FiedValue(980, 2,15));
            list.add(new FiedValue(981, 3,10));
            list.add(new FiedValue(982, 1,3));
            list.add(new FiedValue(3028, 3,35));
            list.add(new FiedValue(411, 3,0));
            list.add(new FiedValue(995, 1,0));
        }
        return list;
    }


    public static List<FiedValue> guardPanelInfo(GuardSet guardSet, short level, Guard guard) {
        CountService countService = SpringUtils.getBean(CountService.class);
        short polar = guardSet.getMenpai();
        short con = 0;
        short str = 0;
        short dex = 0;
        short wiz = 0;
        short metal = 0;
        short wood = 0;
        short water = 0;
        short fire = 0;
        short earth = 0;
        if (polar == 1) {
            con = (short) (guardSet.getTizhi() + level);
            str = (short) (guardSet.getLiliang() + level);
            dex = (short) (guardSet.getMinjie() + level * 2);
            wiz = (short) (guardSet.getLingli() + level * 4);

            metal = (short) (39);
            wood = (short) (6);
            water = (short) (6);
            fire = (short) (14);
            earth = (short) (6);
        } else if (polar == 2) {
            con = (short) (guardSet.getTizhi() + level * 2);
            str = (short) (guardSet.getLiliang() + level);
            dex = (short) (guardSet.getMinjie() + level * 3);
            wiz = (short) (guardSet.getLingli() + level * 2);

            metal = (short) (16);
            wood = (short) (29);
            water = (short) (6);
            fire = (short) (14);
            earth = (short) (6);

        } else if (polar == 3) {
            con = (short) (guardSet.getTizhi() + level);
            str = (short) (guardSet.getLiliang() + level);
            dex = (short) (guardSet.getMinjie() + level * 2);
            wiz = (short) (guardSet.getLingli() + level * 4);

            metal = (short) (16);
            wood = (short) (6);
            water = (short) (29);
            fire = (short) (14);
            earth = (short) (6);

        } else if (polar == 4) {
            con = (short) (guardSet.getTizhi() + level);
            str = (short) (guardSet.getLiliang() + level * 4);
            dex = (short) (guardSet.getMinjie() + level * 2);
            wiz = (short) (guardSet.getLingli() + level);

            metal = (short) (16);
            wood = (short) (6);
            water = (short) (6);
            fire = (short) (14);
            earth = (short) (39);

        } else if (polar == 5) {
            con = (short) (guardSet.getTizhi() + level);
            str = (short) (guardSet.getLiliang() + level * 4);
            dex = (short) (guardSet.getMinjie() + level * 2);
            wiz = (short) (guardSet.getLingli() + level);

            metal = (short) (6);
            wood = (short) (16);
            water = (short) (6);
            fire = (short) (14);
            earth = (short) (39);
        }
        if (guardSet.getColor() == 3) {
            metal = (short) (metal * 1.5);
            wood = (short) (wood * 1.5);
            water = (short) (water * 1.5);
            fire = (short) (fire * 1.5);
            earth = (short) (earth * 1.5);
        } else if (guardSet.getColor() == 2) {
            metal = (short) (metal * 1.2);
            wood = (short) (wood * 1.2);
            water = (short) (water * 1.2);
            fire = (short) (fire * 1.2);
            earth = (short) (earth * 1.2);
        }

        int phyPower = new Double(countService.countPhyPower(earth, str) * 2).intValue();
        int magPower = new Double(countService.countMagPower(metal, wiz) * 3).intValue();
        int defense = new Double(countService.countDefense(water, con) * 3).intValue();
        int speed = new Double(countService.countSpeed(fire, dex) * 1.5).intValue();
        int life = new Double(countService.countLife(level, wood, con) * 1.7).intValue();

        List<FiedValue> list = new ArrayList<>();
        list.add(new FiedValue(1, guardSet.getName()));
        list.add(new FiedValue(2, str));
        list.add(new FiedValue(3, phyPower));
        list.add(new FiedValue(5, con));
        list.add(new FiedValue(6, life));//degree
        list.add(new FiedValue(7, life));
        list.add(new FiedValue(8, defense));
        list.add(new FiedValue(9, wiz));
        list.add(new FiedValue(10, magPower));
        list.add(new FiedValue(13, dex));//degree
        list.add(new FiedValue(14, speed));
        list.add(new FiedValue(24, 0));//degree
        list.add(new FiedValue(31, level));
        list.add(new FiedValue(40, guardSet.getIcon()));
        list.add(new FiedValue(44, guardSet.getMenpai()));
        list.add(new FiedValue(45, metal));
        list.add(new FiedValue(46, wood));//degree
        list.add(new FiedValue(48, fire));
        list.add(new FiedValue(49, earth));
        list.add(new FiedValue(47, water));
        list.add(new FiedValue(63, 0));//亲密
        list.add(new FiedValue(109, guardSet.getColor()));
        list.add(new FiedValue(179, (guard != null ? guard.getType() : 0)));//守护技能 0攻击 1辅助
        list.add(new FiedValue(198, 0));//degree_32?
        list.add(new FiedValue(208, 1));//rebuild_level
        list.add(new FiedValue(267, guardSet.getName()));//原始名字
        list.add(new FiedValue(280, guard == null ? 0 : (int) guard.getIsFight()));
        list.add(new FiedValue(853, 33));//combat_guard_index
        return list;
    }
}
